<?php

/***************
** 模块演示调用数据
***************/

// 获取分类数据
$modulewhere=array();
$modulewhere["arrayclass"]=1;
$modulewhere["order"]='default';
$demodatalist=modulepara("configmodule",$modulewhere,1);

// 获取当前数据
$modulewhere=array();
$modulewhere["tablename"]="zcj_news";
$modulewhere["dataid"]=443;
$modulewhere["dataidname"]="aid";
$test=modulepara("datainfo",$modulewhere);	

// 获取栏目数据
$modulewhere=array();
$modulewhere['tablename'] = "fastxcms_portal_category";
$modulewhere['classid'] = 101;
$modulewhere['limit'] = "all";
$citycateprovince = configcolumn($modulewhere);

// 获取分类下的数据
$modulewhere=array();
$modulewhere['tablename'] = "ims_ewei_shop_member";
$modulewhere['arrayclass'] = "all";
$modulewhere['where'] = "pt_supplier_id>0";
$modulewhere['limit'] = "all";
$modulewhere['order'] = "default";
$supplier_member_list = configmodule($modulewhere);

// 多表关联数据
$modulewhere=array();
$modulewhere['tablename'] = "fastxcms_portal_tag_post";
$modulewhere['arrayclass'] = $articleId;
$modulewhere['bigclassname'] = "post_id";
$modulewhere['limit'] = "all";
$modulewhere['order'] = "default";
$modulewhere['join'] = "left join fastxcms_portal_tag as t on t.id = tl.tag_id";
$modulewhere['langallok'] = 1;
$taglist = configmodule($modulewhere);

// 修改数据
$moduledata = array();
$moduledata['tablename'] = "ims_ewei_shop_member";
$moduledata['data'] = array('headstype' => 1);
$moduledata['dataidname'] = 'openid';
$moduledata['dataid'] = $_W['openid'];
modulepara("updatedata",$moduledata);

// 修改数据
$moduledata = array();
$moduledata['tablename'] = "ims_ewei_shop_member";
$moduledata['data'] = '';
$moduledata['dataidname'] = 'openid';
$moduledata['dataid'] = $val['openid'];
$moduledata['where'] = "";
$moduledata['fielddata'] = "`dknumber`=`dknumber`+1";
modulepara("updatedata",$modulewhere);

// 修改参数
$paradata = array();
$paradata['downloadnumber'] = $article['downloadnumber'] + 1;
updateparadata($paradata, $article['id'], "");

// 插入数据
$moduledata = array();
$moduledata['post_id'] = $insert_id;
$moduledata['category_id'] = moduleaqvarval(array('insertdata','category_id'),'intval');
$moduledata['status'] = 1;
insertdata('fastxcms_portal_category',$moduledata);

// 删除数据
$modulewhere=array();
$modulewhere["tablename"]="zcj_news";
$modulewhere["dataidname"]="aid";
$modulewhere["dataid"]=443;
$modulewhere["where"]="";
$test=modulepara("deletedata",$modulewhere);	

// 接收数据
global $_MGPC_REQ,$_MGPC_GET,$_MGPC_POST,$_MGPC_COOKIE,$_MGPC_SESSION;// 已过滤的接收数据
moduleaqvar($configinfo,array('ajaxid','limit','page'),'intval');// 过滤接收数据组
moduleaqvarval(array('insertdata','category_id'),'intval');// 过滤接收数据
moduleaqvarval('test','intval','cookie');// 过滤cookie数据
moduleaqvarval('test','intval','session');// 过滤session数据
moduleaqvarval('test','intval','post');// 过滤post数据
moduleaqvarval('test','intval','get');// 过滤get数据
moduleaqvarval('test','intval','data');// 过滤已接收数据
moduleaqvarval('test','intval','outdata');// 过滤外部数据

// 将数据存入REQ
$moduleaqvar = array();
$moduleaqvar[0] = 'insertdata-create_time';
$moduleaqvar[1] = 'insertdata-lang';
$moduleaqvar[2] = 'insertdata-user_id';
$moduleaqcontent = array();
$moduleaqcontent[0] = time();
$moduleaqcontent[1] = $lang;
$moduleaqcontent[2] = $configmember['id'];
moduleaqvardata($moduleaqvar,$moduleaqcontent);

?>